<template>
  <div style="height: 100%">
    <el-card class="tree-left">
      <ol-tree :uuid="treeUuid"></ol-tree>
    </el-card>
    <el-card class="table-right">
      <olTable v-bind="$attrs" ref="t1" :uuid="uuid" :init-data-source="false" theme="t1">
        <template v-for='item in Object.keys($slots)' v-slot:[item]>
          <slot :name="item"></slot>
        </template>
      </olTable>
    </el-card>
  </div>
</template>

<script scope>
import OlTree from "@/components/tree/index.vue";
export default {
  name: 'otLeftTreeRightTable',
  components: { OlTree},
  props:{
    uuid:{},
    treeUuid:{},
  },
  methods:{
    setDataSource(data) {
      this.$nextTick(() => {
        this.$refs['t1'].setDataSource(data)
      })
    }
  }
}
</script>
<style lang="less" scoped>
@import "ot-left-tree-right-table.scss";
/deep/ .el-card__body {
  height: 100%;
}

</style>
